// @ts-nocheck
import React from 'react';
import { ApplyPluginsType } from '/opt/lim-web/node_modules/@umijs/runtime';
import * as umiExports from './umiExports';
import { plugin } from './plugin';

export function getRoutes() {
  const routes = [
  {
    "path": "/index.html",
    "redirect": "/home",
    "exact": true
  },
  {
    "path": "/",
    "redirect": "/home",
    "exact": true
  },
  {
    "path": "/test",
    "component": require('@/pages/test').default,
    "exact": true
  },
  {
    "path": "/cases/apiRelationCases",
    "component": require('@/pages/apiRelationCases').default,
    "exact": true
  },
  {
    "path": "/apiCaseFormPage",
    "title": "接口用例",
    "component": require('@/pages/apiCaseFormPage').default,
    "exact": true
  },
  {
    "path": "/apiReport",
    "component": require('@/pages/apiReport').default,
    "exact": true
  },
  {
    "component": require('@/limLayout').default,
    "routes": [
      {
        "name": "主页",
        "title": "主页",
        "path": "/home",
        "icon": "home",
        "component": require('@/pages/index').default,
        "exact": true
      },
      {
        "name": "项目管理",
        "title": "项目管理",
        "path": "/project",
        "icon": "project",
        "component": require('@/pages/project').default,
        "exact": true
      },
      {
        "name": "接口测试",
        "title": "接口测试",
        "path": "/apiCase",
        "icon": "case",
        "component": require('@/pages/apiCase').default,
        "exact": true
      },
      {
        "name": "系统设置",
        "title": "系统设置",
        "path": "/config",
        "icon": "config",
        "routes": [
          {
            "name": "用户管理",
            "title": "用户管理",
            "path": "/config/user",
            "component": require('@/pages/user').default,
            "exact": true
          },
          {
            "name": "环境管理",
            "title": "环境管理",
            "path": "/config/envir",
            "component": require('@/pages/envir').default,
            "exact": true
          }
        ]
      }
    ]
  }
];

  // allow user to extend routes
  plugin.applyPlugins({
    key: 'patchRoutes',
    type: ApplyPluginsType.event,
    args: { routes },
  });

  return routes;
}
